<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/rules/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
				 <!-- 部门名 -->
                 <label class="col-sm-2 control-label">部门名</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="name" value="${n.name }">
                 </div>
                 
				 <!-- 编号 -->
                 <label class="col-sm-2 control-label">编号</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="serialNum" value="${n.serialNum }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 状态，1-未上架，2-已上架，3-已下架 -->
                 <label class="col-sm-2 control-label">状态，1-未上架，2-已上架，3-已下架</label>
                 <div class="col-sm-4">
                 	${enum:detail('RulesStatus', 'status', n.status)}
                 </div>
                 
				 <!-- 标题 -->
                 <label class="col-sm-2 control-label">标题</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="title" value="${n.title }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 概要 -->
                 <label class="col-sm-2 control-label">概要</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="summary" value="${n.summary }">
                 </div>
                 
				 <!-- 缩略图 -->
                 <label class="col-sm-2 control-label">缩略图</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="thumb" value="${n.thumb }">
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- 规章制度文本内容 -->
                 <label class="col-sm-2 control-label">规章制度文本内容</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="content" value="${n.content }">
                 </div>
                 
				 <!-- creator -->
                 <label class="col-sm-2 control-label">creator</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="creator-id" name="creator.id" value="${n.creator.id }" class="form-control">
                 	<input type="text"  placeholder="请选择creator" class="form-control" id="creator-name" value="${n.creator.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/user/search',
						                 	name: 'id',
						                 	idInput: 'creator-id',
						                 	nameInput: 'creator-name'
						                 	})" />
						                 	
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- createTime -->
                 <label class="col-sm-2 control-label">createTime</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="createTime" value="<fmt:formatDate value='${n.createTime }' pattern=''/>" onclick="laydate({format: ''})">
                 </div>
                 
				 <!-- updator -->
                 <label class="col-sm-2 control-label">updator</label>
                 <div class="col-sm-4">
                 	<input type="hidden" id="updator-id" name="updator.id" value="${n.updator.id }" class="form-control">
                 	<input type="text"  placeholder="请选择updator" class="form-control" id="updator-name" value="${n.updator.id }" 
                 		onclick="bring({
						                 	url:'${ctx}/admin/user/search',
						                 	name: 'id',
						                 	idInput: 'updator-id',
						                 	nameInput: 'updator-name'
						                 	})" />
						                 	
                 </div>
            </div>
            <div class="form-group">     
                 
				 <!-- updateTime -->
                 <label class="col-sm-2 control-label">updateTime</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="updateTime" value="<fmt:formatDate value='${n.updateTime }' pattern=''/>" onclick="laydate({format: ''})">
                 </div>
                 
             </div>	
        	
		</form>
</div>

<%@include file="/common/foot.jsp" %>

</body>
</html>
